package devil.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import devil.pojo.Page;

public interface BaseDao
{
	public abstract Object save(Object o);
	
	public abstract Object update(Object o);
	
	public abstract Object saveOrUpdate(Object o);
	
	public abstract void delete(Object o);
	
	public abstract Object findById(java.lang.Integer id, Class<?> objectClass);
	
	public abstract List<?> findByExample(Object o);
	
	public abstract List<?> findByProperty(String propertyName, Object value,
			Class<?> objectClass);
	
	public abstract List<?> findAll(Class<?> objectClass);
	
	public abstract List<?> executeHQL(String hql);
	
	public abstract List<?> findByExample(final Object o, final Page pageInfo);
	
	public abstract List<?> findAll(final Class<?> objectClass,
			final Page pageInfo);
	
	public abstract List<?> executeHql(final String hql,
			final List<Object> params);
	
	public abstract List<?> executeHql(final String hql, final Object... params);
	
	public abstract List<?> executeHql(final Page page, final String hql,
			final List<Object> params);
	
	public abstract List<?> executeHql(final Page page, final String hql,
			final Object... params);
	public abstract void setTheSessionFactory(SessionFactory sessionFactory);
}
